/* awebpng.awebrx - Install or uninstall the AWeb PNG plugin */ options results if left(address(),5)~="AWEB." then do ports=show("P") parse var ports dummy "AWEB." portnr . if portnr="" then do address command "run AWeb3:AWeb-II" address command "WaitForPort AWEB.1" portnr=1 end address value "AWEB."portnr 'get activeport' address value result end parse arg args parse source dummy1 dummy2 called . i=lastpos(called,'/') if i==0 then i=lastpos(called,':') if i>0 then path=left(called,i) else path='' if args='' then do if ~open(tf,"T:awebpngsetup.html","W") then exit call writeln tf,"AWeb PNG Setup" call writeln tf,"

AWeb PNG Setup

" if exists("AWebPath:awebplugin/awebpng.awebplugin") then do installed=0 progress=4 gamma=2.0 lowpri=0 'getcfg MIME stem m' do i=1 to m.0 if upper(left(m.i.value,10))="IMAGE/PNG;" | upper(left(m.i.value,12))="IMAGE/X-PNG" then do parse var m.i.value type ";" ext ";" action ";" file ";" args if action='A' & upper(right(file,18))="AWEBPNG.AWEBPLUGIN" then do installed=1 j=index(upper(args),"PROGRESS=") if j>0 then do progress=substr(args,j+9) j=verify(progress,"0123456789") if j>0 then progress=left(progress,j-1) end j=index(upper(args),"GAMMA=") if j>0 then do gamma=substr(args,j+6) j=verify(gamma,"0123456789.") if j>0 then gamma=left(gamma,j-1) end lowpri=(index(upper(args),"LOWPRI")>0) end leave end end call writeln tf,"
" call writeln tf,"
" call writeln tf,"This form configures AWeb-II to use the AWeb PNG plugin." call writeln tf,"" call writeln tf,"
  1. Select the required modes of operation " call writeln tf,"(see documentation for details)" call writeln tf,"

    • Progressive display:
      " call writeln tf," No progressive display (fastest)
      " call writeln tf," Standard progressive display
      " call writeln tf," Smooth progressive display (slowest)
      " call writeln tf,"

    • Gamma (colour correction factor):
      " call writeln tf," (Default value 2.0)
      " call writeln tf,"

    • Multitasking:
      " call writeln tf," Run decoder at low priority
      " call writeln tf,"
    " call writeln tf,"

  2. Save the new settings" call writeln tf,"

  3. " call writeln tf,"
" if installed>0 then do call writeln tf,"

" call writeln tf,"
" call writeln tf,"" call writeln tf,"This form will deinstall the AWeb PNG plugin and reset the default (datatypes) decoder for PNG images." call writeln tf,"
  1. Save the new settings" call writeln tf,"

  2. " call writeln tf,"
" end end else do call writeln tf,"Plugin file not found. You have to run the install script first." end call writeln tf,"


Back to documentation" call close tf 'open "file:///T:awebpngsetup.html" reload' 'wait "file:///T:awebpngsetup.html"' 'allowcmd' address command 'delete T:awebpngsetup.html quiet' end else do type="IMAGE/PNG" ext="png" rest=";" 'getcfg MIME stem m' do i=1 to m.0 if upper(left(m.i.value,10))="IMAGE/PNG;" | upper(left(m.i.value,12))="IMAGE/X-PNG" then do parse var m.i.value type ";" ext ";" action ";" rest leave end end if upper(left(args,9))="DEINSTALL" then do mime=type";"ext";;"rest end else do progress="" defprogress="4" gamma="2.0" lowpri="" save="" do while args~="" parse var args nextarg args interpret nextarg end if progress="" then progress=defprogress mime=type";"ext";A;AWebPath:awebplugin/awebpng.awebplugin;PROGRESS="progress" GAMMA="gamma lowpri end 'setcfg MIME "'mime'" ADD' if upper(save)="YES" then do 'savesettings' end 'open "file:///AWebPath:awebplugin/docs/awebpng.html"' end exit